/*
 * @Author: liuYang codkly@gmail.com
 * @Date: 2022-12-05 18:01:22
 * @LastEditors: liuYang codkly@gmail.com
 * @LastEditTime: 2022-12-08 13:27:58
 * @FilePath: \coding\nest\blog_alpha\entity\base.entity.ts
 * @Description:
 * 暂无备注
 */
import {
  Entity,
  PrimaryGeneratedColumn,
  CreateDateColumn,
  Column,
  UpdateDateColumn,
  DeleteDateColumn,
} from 'typeorm';



@Entity()
export class BaseEntity {
  @PrimaryGeneratedColumn('uuid')
  id: string;

  @Column({
    nullable: true,
    comment: '状态',
    default: () => 0,
  })
  status: boolean;

  @CreateDateColumn({
    // name: 'createAt',
    comment: '创建时间',
    select: false,
    // default: () => 'CURRENT_TIMESTAMP',
  })
  created_at: Date;

  @UpdateDateColumn({
    // name: 'updateAt',
    comment: '修改时间',
  })
  updated_at: Date;

  @DeleteDateColumn({
    name: 'delete_at',
    comment: '删除时间',
  })
  delete_at: Date;
  
}
